package com.example.helper2;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public class fragment_new_latest extends Fragment {
    private TextView DefiniteDiagnosis,Dead,StillDe,Heal;
    private Button button1,button2;
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
        return inflater.inflate(R.layout.new_latest,container,false);
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        DefiniteDiagnosis = view.findViewById(R.id.diagnosis);
        Dead = view.findViewById(R.id.diagnosis2);
        Heal = view.findViewById(R.id.diagnosis3);
        StillDe = view.findViewById(R.id.diagnosis5);

        button1 = view.findViewById(R.id.Inner);
        button2 = view.findViewById(R.id.outer);

        button1.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                DefiniteDiagnosis.setText("81960");
                Dead.setText("3293");
                Heal.setText("74196");
                StillDe.setText("4471");
            }
        });
        button2.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                DefiniteDiagnosis.setText("374450");
                Dead.setText("17425");
                Heal.setText("37290");
                StillDe.setText("319735");
            }
        });
    }
}
